package com.oc.mba.presist;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "exam_paper_topic_solution")
public class Solution {

	@DatabaseField(generatedId = true)
	private Long id;
	
	/** 问题ID **/
	private Long solutionId;
	
	@DatabaseField
	private String content;
	
	@DatabaseField(foreign = true, foreignAutoRefresh = true,columnName="topicId") 
	private Topic topic;
	
	public Solution() {
		
	}

	public Long getSolutionId() {
		return solutionId;
	}

	public void setSolutionId(Long solutionId) {
		this.solutionId = solutionId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id=").append(id);
		sb.append("solutionId=").append(solutionId);
		sb.append(" ,content=").append(content);
		return sb.toString();
	}
}
